﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Admin.ViewModels.MemberIndexModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Lib.Paging" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sản phẩm theo thành viên
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%if(Model.Members!=null){ %>
<form action="" name="adminForm">
 <ul style="margin:0px; padding:0px; list-style-type:square">
    <%foreach (var item in Model.Members) { %>
       <li style="display:block; margin:10px; width:200px; float:left; border: 1px solid #f2f2f2; padding:5px;"><%=Html.ActionLink((item.FullName != string.Empty ? item.FullName : item.User.aspnet_User.UserName)+"("+item.ProductCount+")", "Details", new {id=item.User.UserId })%></li> 
    <%} %>
 </ul>
 <div class="clear"></div>
 <div class="pager">
<label>Hiển thị #</label>
    <%
        int[] pageSizeList = {1, 5, 10, 15, 20, 25, 50, 100};
    %>
    <%= Html.DropDownList("PageSize", new SelectList(pageSizeList, Model.Members.PageSize), new { onchange = "document.adminForm.submit();" })%>

    <%= Html.Pager(Model.Members.PageSize, Model.Members.PageNumber, Model.Members.TotalItemCount)%>
</div>   
</form>
<%} %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
Thống kê sản phẩm theo thành viên
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
<%= ViewData["MessageInfo"] != null ? "<p class='perror'>" + Html.Encode(ViewData["MessageInfo"]) + "</p>" : string.Empty %>
</asp:Content>
